import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
    {
        path: "/s1",
        component: () => import('../views/demo2/children/St1.vue')
    },
    {
        path: "/s2",
        component: () => import('../views/demo2/children/St2.vue')
    },
    {
        path: "/s3",
        component: () => import('../views/demo2/children/St3.vue'),
        children: [
            {
                path: "/s31",
                component: () => import('../views/demo2/children/St31.vue')
            }, {
                path: "/s32",
                component: () => import('../views/demo2/children/St32.vue')
            }
        ]
    },
    {
        path: '/: pathMather(.*)*',
        redirect : '/s31',
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes: routes
})

export default router